import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import WindiCSS from 'vite-plugin-windicss'
import { resolve } from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  base: '/',
  plugins: [vue(), WindiCSS(),],
  resolve: {
    alias: {
       // 为 src 目录设置别名
       '@': resolve(__dirname, './src'),
       // 为 src/components 目录设置别名
       '@components': resolve(__dirname, './src/components'),
       // 其他的别名...
    },
  },
  build: {
    outDir: 'dist',
    rollupOptions: {
      input: {
        // 定义多页面入口文件
        index: resolve(__dirname, './index.html'),
        main: resolve(__dirname, './player-image/index.html'),
        admin: resolve(__dirname, './player-video/index.html'),
      },
    },
  },
})
